<?php
$uid = $_POST['uid'];
include ("conn.php");
include ("findPage.php");
$sql = "SELECT * FROM pageList WHERE auid=".$uid;
$result = $conn->query($sql);
$arr = array();
if ($result->num_rows > 0) {
	while($row = $result->fetch_assoc()) {
		$tempPid = $row['id'];
		array_push($arr,findPage($tempPid));
	}
}
echo json_encode($arr);
?>